﻿using System.Web;
using System.Web.SessionState;

namespace XStudio.XCRF.Web.Common.Sessions
{
    /// <summary>
    /// Session信息基类
    /// </summary>
    public class BaseSession
    {
        private static HttpSessionState _CurrentSession = null;
        /// <summary>
        /// 获取当前服务器Session
        /// </summary>
        public static HttpSessionState CurrentSession
        {
            get
            {
                if (_CurrentSession == null)
                    _CurrentSession = HttpContext.Current.Session;
                return HttpContext.Current.Session;
            }
        }
    }
}